overlap Subroutine

public pure subroutine overlap(x, seg, winsize, buffer)

Extracts a segment from a signal allowing for a nominally 50% overlap.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

An N-element array containing the entire signal.

integer(kind=int32), intent(in) :: seg

The one-based index of the segment to extract.

integer(kind=int32), intent(in) :: winsize

The size of the window (segment). If this value is less than N, the end of the segment will be padded with zeros.

real(kind=real64), intent(out) :: buffer(:)

A winsize array where the segment will be written.